package o;

import com.huawei.appgallery.festivalanimation.particle.modifiers.SizeModifier;
import java.util.ArrayList;
import o.el.c;
import o.eo.a;

public class ep extends el {
    private eo ʻˊ = this.ʻॱ;
    private int ʻˋ = 0;
    protected int ʻᐝ = -1;
    protected float ʼˊ = SizeModifier.STABLE_STATE_SCALE;
    protected int ʼˋ = -1;
    private er ʽˊ = new er();
    private boolean ʽˋ = false;
    private int ʽᐝ = 8;
    private int ʾॱ = 0;

    public ep() {
        int i = 0;
        this.ˊᐝ.clear();
        this.ˊᐝ.add(this.ʻˊ);
        int length = this.ˋˊ.length;
        while (i < length) {
            this.ˋˊ[i] = this.ʻˊ;
            i++;
        }
    }

    public boolean ॱ() {
        return true;
    }

    public void ˊ(int i) {
        if (this.ʻˋ != i) {
            this.ʻˋ = i;
            this.ˊᐝ.clear();
            if (this.ʻˋ == 1) {
                this.ʻˊ = this.ᐝॱ;
            } else {
                this.ʻˊ = this.ʻॱ;
            }
            this.ˊᐝ.add(this.ʻˊ);
            int length = this.ˋˊ.length;
            for (int i2 = 0; i2 < length; i2++) {
                this.ˋˊ[i2] = this.ʻˊ;
            }
        }
    }

    public int ˋ() {
        return this.ʻˋ;
    }

    public eo ˎ(a aVar) {
        switch (aVar) {
            case LEFT:
            case RIGHT:
                if (this.ʻˋ == 1) {
                    return this.ʻˊ;
                }
                break;
            case TOP:
            case BOTTOM:
                if (this.ʻˋ == 0) {
                    return this.ʻˊ;
                }
                break;
            case BASELINE:
            case CENTER:
            case CENTER_X:
            case CENTER_Y:
            case NONE:
                return null;
        }
        throw new AssertionError(aVar.name());
    }

    public ArrayList<eo> ˊˋ() {
        return this.ˊᐝ;
    }

    public void ॱ(float f) {
        if (f > SizeModifier.STABLE_STATE_SCALE) {
            this.ʼˊ = f;
            this.ʼˋ = -1;
            this.ʻᐝ = -1;
        }
    }

    public void ʾ(int i) {
        if (i > -1) {
            this.ʼˊ = SizeModifier.STABLE_STATE_SCALE;
            this.ʼˋ = i;
            this.ʻᐝ = -1;
        }
    }

    public void ʿ(int i) {
        if (i > -1) {
            this.ʼˊ = SizeModifier.STABLE_STATE_SCALE;
            this.ʼˋ = -1;
            this.ʻᐝ = i;
        }
    }

    public void ˋ(int i) {
        el ॱˊ = ॱˊ();
        if (ॱˊ != null) {
            int i2;
            if (ˋ() == 1) {
                this.ʻॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), 0);
                this.ʽॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), 0);
                if (this.ʼˋ != -1) {
                    this.ᐝॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), this.ʼˋ);
                    this.ʼॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), this.ʼˋ);
                    return;
                } else if (this.ʻᐝ != -1) {
                    this.ᐝॱ.ˎ().ˏ(1, ॱˊ.ʼॱ.ˎ(), -this.ʻᐝ);
                    this.ʼॱ.ˎ().ˏ(1, ॱˊ.ʼॱ.ˎ(), -this.ʻᐝ);
                    return;
                } else if (this.ʼˊ != SizeModifier.STABLE_STATE_SCALE && ॱˊ.ˍ() == c.FIXED) {
                    i2 = (int) (((float) ॱˊ.ˍ) * this.ʼˊ);
                    this.ᐝॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), i2);
                    this.ʼॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), i2);
                    return;
                } else {
                    return;
                }
            }
            this.ᐝॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), 0);
            this.ʼॱ.ˎ().ˏ(1, ॱˊ.ᐝॱ.ˎ(), 0);
            if (this.ʼˋ != -1) {
                this.ʻॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), this.ʼˋ);
                this.ʽॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), this.ʼˋ);
            } else if (this.ʻᐝ != -1) {
                this.ʻॱ.ˎ().ˏ(1, ॱˊ.ʽॱ.ˎ(), -this.ʻᐝ);
                this.ʽॱ.ˎ().ˏ(1, ॱˊ.ʽॱ.ˎ(), -this.ʻᐝ);
            } else if (this.ʼˊ != SizeModifier.STABLE_STATE_SCALE && ॱˊ.ˌ() == c.FIXED) {
                i2 = (int) (((float) ॱˊ.ˎˎ) * this.ʼˊ);
                this.ʻॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), i2);
                this.ʽॱ.ˎ().ˏ(1, ॱˊ.ʻॱ.ˎ(), i2);
            }
        }
    }

    public void ˏ(ea eaVar) {
        int i = 1;
        ek ekVar = (ek) ॱˊ();
        if (ekVar != null) {
            Object ˎ;
            Object obj;
            eo ˎ2 = ekVar.ˎ(a.LEFT);
            eo ˎ3 = ekVar.ˎ(a.RIGHT);
            int i2 = this.ˊˋ != null ? this.ˊˋ.ˉ[0] == c.WRAP_CONTENT ? 1 : 0 : 0;
            if (this.ʻˋ == 0) {
                eo ˎ4 = ekVar.ˎ(a.TOP);
                ˎ = ekVar.ˎ(a.BOTTOM);
                if (this.ˊˋ == null) {
                    i = 0;
                } else if (this.ˊˋ.ˉ[1] != c.WRAP_CONTENT) {
                    i = 0;
                }
                obj = ˎ4;
            } else {
                i = i2;
                eo eoVar = ˎ3;
                ˎ3 = ˎ2;
            }
            eh ˊ;
            if (this.ʼˋ != -1) {
                ˊ = eaVar.ˊ(this.ʻˊ);
                eaVar.ˊ(ˊ, eaVar.ˊ(obj), this.ʼˋ, 6);
                if (i != 0) {
                    eaVar.ˋ(eaVar.ˊ(ˎ), ˊ, 0, 5);
                }
            } else if (this.ʻᐝ != -1) {
                ˊ = eaVar.ˊ(this.ʻˊ);
                eh ˊ2 = eaVar.ˊ(ˎ);
                eaVar.ˊ(ˊ, ˊ2, -this.ʻᐝ, 6);
                if (i != 0) {
                    eaVar.ˋ(ˊ, eaVar.ˊ(obj), 0, 5);
                    eaVar.ˋ(ˊ2, ˊ, 0, 5);
                }
            } else if (this.ʼˊ != SizeModifier.STABLE_STATE_SCALE) {
                eaVar.ˏ(ea.ˏ(eaVar, eaVar.ˊ(this.ʻˊ), eaVar.ˊ(obj), eaVar.ˊ(ˎ), this.ʼˊ, this.ʽˋ));
            }
        }
    }

    public void ˋ(ea eaVar) {
        if (ॱˊ() != null) {
            int ॱ = eaVar.ॱ(this.ʻˊ);
            if (this.ʻˋ == 1) {
                ʽ(ॱ);
                ʼ(0);
                ॱˊ(ॱˊ().ᐝॱ());
                ᐝ(0);
                return;
            }
            ʽ(0);
            ʼ(ॱ);
            ᐝ(ॱˊ().ॱᐝ());
            ॱˊ(0);
        }
    }
}
